import request from '@/config/axios'




// 查询财富列表
export const getWealthRecordPage = async (params) => {
  return await request.get({ url: `/hutai/wealth-record/page`, params })
}

//查询某个用户财富记录
export const getWealthRecordList = async (id: number) => {
  return await request.get({ url: `/hutai/wealth-record/get?userId=` +id })
}


//查询某个用户财富记录
export const getWealth = async (id: number) => {
  return await request.get({ url: `/hutai/wealth-record/getWealth?userId=` +id })
}

// 修改我的财富值
export const updateMyWealth = async (data) => {
  return await request.put({ url: `/hutai/wealth-record/updateMyWealth`, data })
}

// 查询返利值
export const getRateValue = async (params) => {
  return await request.get({ url: `/hutai/wealth-record/getRateValue?key=`+params})
}
//设置返利值
export const updateRate = async (data) => {
  return await request.put({ url: `/hutai/wealth-record/updateRate`, data })
}
